<template>
  <div>
    <div class="recommend-title">热销推荐</div>
    <ul>
      <router-link
        tag="li"
        class="item border-bottom"
        v-for="item in List"
        :key="item.id"
        :to="'/detail/' + item.id"
      >
        <div class="item-a">
            <img width="100%" class="item-img-box" :src="item.imgUrl" alt="images">
          <div class="item-text-box">
            <p class="item-text">{{item.title}}</p>
            <p class="item-desc">{{item.desc}}</p>
            <div class="item-money">
              <span class="mpg-price">
                ¥<em class="mpg-price-num">{{item.money}}</em>
              </span>起
              <span class="mp-like-address">{{item.address}}</span>
            </div>
          </div>
        </div>
      </router-link>
    </ul>
    <div class="allProduct">查看所有产品</div>
  </div>
</template>
<script>
export default{
  name: 'homeRecommend',
  props: {
    List: Array
  },
  data () {
    return {
    }
  }
}
</script>
<style lang="stylus" scoped>
  @import "~styles/mixins.styl";
  .recommend-title
    background: #eee
    margin-top: .1rem
    line-height: .8rem
    text-indent: .2rem
  .allProduct
    padding: .2rem 0
    color: #00afc7
    font-size: .28rem
    line-height: .4rem
    text-align: center
  .item
    height: 2.3rem
    overflow: hidden
    box-sizing: border-box
    padding: 0.15rem 0
    margin: 0 0.2rem
    .item-a
      color: #000
      display: flex
      width: 100%
      height: 100%
      .item-img-box
        width: 2rem
        height: 2rem
      .item-text-box
        flex: 1
        padding: .1rem .1rem .1rem .25rem
        min-width: 0
        .item-text
          margin-top: .15rem
          height: .44rem
          color: #212121
          font-size: .32rem
          line-height: .44rem
          ellipsis()
        .item-desc
          margin-top: .1rem
          height: .4rem
          line-height: .4rem
          color: #ccc
          font-size: .3rem
          ellipsis()
        .item-money
          position: relative
          margin-top: .2rem
          color: #616161
          font-size: .24rem
          line-height: .4rem
          .mpg-price
            color: #ff8300
            .mpg-price-num
              font-size: .4rem
          .mp-like-address
            position: absolute
            right: .24rem
            bottom: 0
</style>
